home *** CD-ROM | disk | FTP | other *** search
/ Computer Select (Limited Edition) / Computer Select.iso / dobbs / v17n02 / turtle.exe / TURTLE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-03  |  1.6 KB  |  43 lines

  1. /*****************************************************************
  2.  *                                                               *
  3.  * TURTLE.H  Header for TURTLE.EXE                               *
  4.  *                                                               *
  5.  * Al Williams                                                   *
  6.  *                                                               *
  7.  *****************************************************************/
  8. #include <graph.h>
  9. typedef  unsigned long ulong;
  10. typedef  unsigned int uint;
  11.  
  12. /* graphics buffer */
  13. extern char _gbuf[64000];
  14.  
  15. /* Application data (passed to XCI commands) */
  16. struct  udata
  17.   {
  18.   char *gbuf;               /* pointer to graphics buffer */
  19.   char tbuf[4000];          /* text buffer */
  20.   char *gptr;               /* pointer to graphics screen */
  21.   char *tptr;               /* pointer to text screen */
  22.   struct xycoord graphxy;   /* x,y of graphic screen */
  23.   struct rccoord textxy;    /* x,y of text screen */
  24.   int color;                /* color */
  25.   long backcolor;           /* background color */
  26. /* store[10] & store[11] are for internal use */
  27.   char *store[12];          /* screen storage */
  28.   unsigned int mode:1;      /* draw or move */
  29.   unsigned int textgraph:1; /* if 1, don't exit graphic mode */
  30.   int heading;              /* turtle heading */
  31.  
  32. /* X and Y are stored as reals too to combat rounding errors */
  33.   double realx;
  34.   double realy;
  35. /* 26 variables A-Z */
  36.   long vars[26];
  37. /* text color */
  38.   int tcolor;
  39.   };
  40.  
  41. /* Application data structure */
  42. extern struct udata appdata;
  43.